1 TADPOLE Univariate Options Analysis

1.0.1 Loading the libraries

library("FRESA.CAD")
library(readxl)
library("whitening")
library("fpc")
library("robust")
op <- par(no.readonly = TRUE)
pander::panderOptions('digits', 3)
pander::panderOptions('table.split.table', 400)
pander::panderOptions('keep.trailing.zeros',TRUE)
TrainFraction <- 0.50;

dataLoad = FALSE

1.1 The data set

TADPOLE_D1_D2 <- read.csv("~/GitHub/BSWiMS/Data/TADPOLE/TADPOLE_D1_D2.csv")
TADPOLE_D1_D2_Dict <- read.csv("~/GitHub/BSWiMS/Data/TADPOLE/TADPOLE_D1_D2_Dict.csv")
TADPOLE_D1_D2_Dict_LR <- as.data.frame(read_excel("~/GitHub/BSWiMS/Data/TADPOLE/TADPOLE_D1_D2_Dict_LR.xlsx",sheet = "LeftRightFeatures"))


rownames(TADPOLE_D1_D2_Dict) <- TADPOLE_D1_D2_Dict$FLDNAME

1.2 Conditioning the data


# mm3 to mm
isVolume <- c("Ventricles","Hippocampus","WholeBrain","Entorhinal","Fusiform","MidTemp","ICV",
              TADPOLE_D1_D2_Dict$FLDNAME[str_detect(TADPOLE_D1_D2_Dict$TEXT,"Volume")]
              )


#TADPOLE_D1_D2[,isVolume] <- apply(TADPOLE_D1_D2[,isVolume],2,'^',(1/3))
TADPOLE_D1_D2[,isVolume] <- TADPOLE_D1_D2[,isVolume]^(1/3)

# mm2 to mm
isArea <- TADPOLE_D1_D2_Dict$FLDNAME[str_detect(TADPOLE_D1_D2_Dict$TEXT,"Area")]
TADPOLE_D1_D2[,isArea] <- sqrt(TADPOLE_D1_D2[,isArea])

# Get only cross sectional measurements
FreeSurfersetCross <- str_detect(colnames(TADPOLE_D1_D2),"UCSFFSX")

# The subset of baseline measurements
baselineTadpole <- subset(TADPOLE_D1_D2,VISCODE=="bl")
table(baselineTadpole$DX)
                   Dementia Dementia to MCI             MCI MCI to Dementia 
          7             336               1             864               5 
  MCI to NL              NL       NL to MCI 
          2             521               1 
table(baselineTadpole$DX_bl)

AD CN EMCI LMCI SMC 342 417 310 562 106


rownames(baselineTadpole) <- baselineTadpole$PTID


validBaselineTadpole <- cbind(DX=baselineTadpole$DX_bl,
                                 AGE=baselineTadpole$AGE,
                                 Gender=1*(baselineTadpole$PTGENDER=="Female"),
                                 ADAS11=baselineTadpole$ADAS11,
                                 ADAS13=baselineTadpole$ADAS13,
                                 MMSE=baselineTadpole$MMSE,
                                 RAVLT_immediate=baselineTadpole$RAVLT_immediate,
                                 RAVLT_learning=baselineTadpole$RAVLT_learning,
                                 RAVLT_forgetting=baselineTadpole$RAVLT_forgetting,
                                 RAVLT_perc_forgetting=baselineTadpole$RAVLT_perc_forgetting,
                                 FAQ=baselineTadpole$FAQ,
                                 Ventricles=baselineTadpole$Ventricles,
                                 Hippocampus=baselineTadpole$Hippocampus,
                                 WholeBrain=baselineTadpole$WholeBrain,
                                 Entorhinal=baselineTadpole$Entorhinal,
                                 Fusiform=baselineTadpole$Fusiform,
                                 MidTemp=baselineTadpole$MidTemp,
                                 ICV=baselineTadpole$ICV,
                                 baselineTadpole[,FreeSurfersetCross])


LeftFields <- TADPOLE_D1_D2_Dict_LR$LFN
names(LeftFields) <- LeftFields
LeftFields <- LeftFields[LeftFields %in% colnames(validBaselineTadpole)]
RightFields <- TADPOLE_D1_D2_Dict_LR$RFN
names(RightFields) <- RightFields
RightFields <- RightFields[RightFields %in% colnames(validBaselineTadpole)]

## Normalize to ICV
validBaselineTadpole$Ventricles=validBaselineTadpole$Ventricles/validBaselineTadpole$ICV
validBaselineTadpole$Hippocampus=validBaselineTadpole$Hippocampus/validBaselineTadpole$ICV
validBaselineTadpole$WholeBrain=validBaselineTadpole$WholeBrain/validBaselineTadpole$ICV
validBaselineTadpole$Entorhinal=validBaselineTadpole$Entorhinal/validBaselineTadpole$ICV
validBaselineTadpole$Fusiform=validBaselineTadpole$Fusiform/validBaselineTadpole$ICV
validBaselineTadpole$MidTemp=validBaselineTadpole$MidTemp/validBaselineTadpole$ICV

leftData <- validBaselineTadpole[,LeftFields]/validBaselineTadpole$ICV
RightData <- validBaselineTadpole[,RightFields]/validBaselineTadpole$ICV

## get mean and relative difference 
meanLeftRight <- (leftData + RightData)/2
difLeftRight <- abs(leftData - RightData)
reldifLeftRight <- difLeftRight/meanLeftRight
colnames(meanLeftRight) <- paste("M",colnames(meanLeftRight),sep="_")
colnames(difLeftRight) <- paste("D",colnames(difLeftRight),sep="_")
colnames(reldifLeftRight) <- paste("RD",colnames(reldifLeftRight),sep="_")


validBaselineTadpole <- validBaselineTadpole[,!(colnames(validBaselineTadpole) %in% 
                                               c(LeftFields,RightFields))]
#validBaselineTadpole <- cbind(validBaselineTadpole,meanLeftRight,difLeftRight,reldifLeftRight)
validBaselineTadpole <- cbind(validBaselineTadpole,meanLeftRight,difLeftRight)

## Remove columns with too many NA more than %15 of NA
nacount <- apply(is.na(validBaselineTadpole),2,sum)/nrow(validBaselineTadpole) < 0.15
diagnose <- validBaselineTadpole$DX
pander::pander(table(diagnose))
AD CN EMCI LMCI SMC
342 417 310 562 106
validBaselineTadpole <- validBaselineTadpole[,nacount]
## Remove character columns
ischar <- sapply(validBaselineTadpole,class) == "character"
validBaselineTadpole <- validBaselineTadpole[,!ischar]
## Place back diagnose
validBaselineTadpole$DX <- diagnose


validBaselineTadpole <- validBaselineTadpole[complete.cases(validBaselineTadpole),]
ischar <- sapply(validBaselineTadpole,class) == "character"
validBaselineTadpole[,!ischar] <- sapply(validBaselineTadpole[,!ischar],as.numeric)

colnames(validBaselineTadpole) <- str_remove_all(colnames(validBaselineTadpole),"_UCSFFSX_11_02_15_UCSFFSX51_08_01_16")
colnames(validBaselineTadpole) <- str_replace_all(colnames(validBaselineTadpole)," ","_")
validBaselineTadpole$LONISID <- NULL
validBaselineTadpole$IMAGEUID <- NULL
validBaselineTadpole$LONIUID <- NULL

diagnose <- as.character(validBaselineTadpole$DX)
validBaselineTadpole$DX <- diagnose
pander::pander(table(validBaselineTadpole$DX))
AD CN EMCI LMCI SMC
245 359 272 444 93


validBaselineTadpole[validBaselineTadpole$DX %in% c("EMCI","LMCI"),"DX"] <- "MCI" 
validBaselineTadpole[validBaselineTadpole$DX %in% c("CN","SMC"),"DX"] <- "NL" 

pander::pander(table(validBaselineTadpole$DX))
AD MCI NL
245 716 452

1.3 Get the Time To Event on MCI Subjects


subjectsID <- rownames(validBaselineTadpole)
visitsID <- unique(TADPOLE_D1_D2$VISCODE)
baseDx <- TADPOLE_D1_D2[TADPOLE_D1_D2$VISCODE=="bl",c("PTID","DX","EXAMDATE")]
rownames(baseDx) <- baseDx$PTID 
baseDx <- baseDx[subjectsID,]
lastDx <- baseDx
toDementia <- baseDx
table(lastDx$DX)
   Dementia Dementia to MCI             MCI MCI to Dementia       MCI to NL 
        244               1             711               2               2 
         NL       NL to MCI 
        452               1 
hasDementia <- lastDx$PTID[str_detect(lastDx$DX,"Dementia")]


for (vid in visitsID)
{
  DxValue <- TADPOLE_D1_D2[TADPOLE_D1_D2$VISCODE==vid,c("PTID","DX","EXAMDATE")]
  rownames(DxValue) <- DxValue$PTID 
  DxValue <- DxValue[DxValue$PTID %in% subjectsID,]
  noDX <- DxValue$PTID[nchar(DxValue$DX) < 1]
  print(length(noDX))
  DxValue[noDX,] <- lastDx[noDX,]
  inLast <- lastDx$PTID[lastDx$PTID %in% DxValue$PTID]
  print(length(inLast))
  lastDx[inLast,] <- DxValue[inLast,]
  noDementia <- !(toDementia$PTID %in% hasDementia)
  toDementia[noDementia,] <- lastDx[noDementia,]
  hasDementia <- unique(c(hasDementia,lastDx$PTID[str_detect(lastDx$DX,"Dementia")]))
}

[1] 0 [1] 1413 [1] 2 [1] 1326 [1] 6 [1] 1218 [1] 23 [1] 1095 [1] 805 [1] 1058 [1] 29 [1] 710 [1] 20 [1] 212 [1] 14 [1] 167 [1] 32 [1] 553 [1] 25 [1] 298 [1] 18 [1] 130 [1] 667 [1] 667 [1] 112 [1] 112 [1] 176 [1] 176 [1] 177 [1] 177 [1] 625 [1] 625 [1] 251 [1] 251 [1] 159 [1] 159 [1] 7 [1] 7 [1] 17 [1] 99 [1] 9 [1] 63 [1] 1 [1] 1

table(lastDx$DX)
   Dementia Dementia to MCI             MCI MCI to Dementia       MCI to NL 
        428               2             463              80               7 
         NL  NL to Dementia       NL to MCI 
        406               1              26 
baseMCI <-baseDx$PTID[baseDx$DX == "MCI"]
lastDementia <- lastDx$PTID[str_detect(lastDx$DX,"Dementia")]
lastDementia2 <- toDementia$PTID[str_detect(toDementia$DX,"Dementia")]
lastNL <- lastDx$PTID[str_detect(lastDx$DX,"NL")]

MCIatBaseline <- baseDx[baseMCI,]
MCIatEvent <- toDementia[baseMCI,]
MCIatLast <- lastDx[baseMCI,]

MCIconverters <- MCIatBaseline[baseMCI %in% lastDementia,]
MCI_No_converters <- MCIatBaseline[!(baseMCI %in% MCIconverters$PTID),]
MCIconverters$TimeToEvent <- (as.Date(toDementia[MCIconverters$PTID,"EXAMDATE"]) 
                                   - as.Date(MCIconverters$EXAMDATE))

sum(MCIconverters$TimeToEvent ==0)

[1] 0



MCIconverters$AtEventDX <- MCIatEvent[MCIconverters$PTID,"DX"]
MCIconverters$LastDX <- MCIatLast[MCIconverters$PTID,"DX"]

MCI_No_converters$TimeToEvent <- (as.Date(lastDx[MCI_No_converters$PTID,"EXAMDATE"]) 
                                   - as.Date(MCI_No_converters$EXAMDATE))

MCI_No_converters$LastDX <- MCIatLast[MCI_No_converters$PTID,"DX"]

MCI_No_converters <- subset(MCI_No_converters,TimeToEvent > 0)

2 Prognosis MCI to AD Conversion

2.1 the set


MCIPrognosisIDs <- c(MCIconverters$PTID,MCI_No_converters$PTID)

TADPOLECrossMRI <- validBaselineTadpole[MCIPrognosisIDs,]
table(TADPOLECrossMRI$DX)

MCI 680

TADPOLECrossMRI$DX <- NULL
TADPOLECrossMRI$status <- 1*(rownames(TADPOLECrossMRI) %in% MCIconverters$PTID)
table(TADPOLECrossMRI$status)

0 1 436 244

TADPOLECrossMRI$TimeToEvent <- numeric(nrow(TADPOLECrossMRI))
TADPOLECrossMRI[MCIconverters$PTID,"TimeToEvent"] <- MCIconverters$TimeToEvent
TADPOLECrossMRI[MCI_No_converters$PTID,"TimeToEvent"] <- MCI_No_converters$TimeToEvent



set.seed(1)
trainCases <- sample(nrow(TADPOLECrossMRI),nrow(TADPOLECrossMRI)*TrainFraction)

TADPOLE_Conv_TRAIN <- TADPOLECrossMRI[trainCases,]
TADPOLE_Conv_TEST <- TADPOLECrossMRI[-trainCases,]

pander::pander(table(TADPOLE_Conv_TRAIN$status))
0 1
218 122
pander::pander(table(TADPOLE_Conv_TEST$status))
0 1
218 122

surTimeTrain <- TADPOLE_Conv_TRAIN$TimeToEvent
surTimeTest <- TADPOLE_Conv_TEST$TimeToEvent


TADPOLE_Conv_TRAIN$TimeToEvent <- NULL
TADPOLE_Conv_TEST$TimeToEvent <- NULL

2.1.0.1 Analysis parameters

dataframe <- TADPOLE_Conv_TRAIN
dataframeTest <- TADPOLE_Conv_TEST
outcome <- "status"

2.1.1 All the run options

sig_pvalue <- 0.01
thr <- c(0.05,0.2,0.4,0.6,0.8,0.95);
method  <- c("fast","pearson","spearman");
type <- c("LM","RLM")
DeOutcome <- c("T_Blind","T_Driven")
corRank <- c(FALSE,TRUE)

#method  <- c("fast","pearson","spearman");
#type <- c("LM","RLM")

2.2 Decorrelation Analysis


if (dataLoad)
{
  load("~/GitHub/LatentBiomarkers/RMD/TADPOLE_ALL_Options.RData")
} else
{
  
  idx = 0;
  thenames <- list();
  totBaM <- NULL
  totDeM <- NULL
  toUnmatM <- NULL
  unalteredM <- NULL
  Decorrleated_FractionM<- NULL
  Base_FractionM<- NULL
  Unaltered_FractionM <- NULL
  sparcityM <- NULL
  Average_Latent_SizeM <- NULL
  SigDeM <- NULL
  La_SignificantM <- NULL
  pbKNNaucM <- NULL
  pbKNNaccM <- NULL
  
  for (DeOut in DeOutcome)
  {
    for (meth in method)
    {
      for (typ in type)
      {
        for (corran in corRank)
        {
          par(op)
          par(mfrow=c(3,2),cex=0.5)
          idx <- idx + 1;
          thenames[[idx]] <- paste(DeOut,meth,typ,corran,sep="_")
          totBa <- numeric()
          totDe <- numeric()
          toUnmat <- numeric()
          unaltered <- numeric()
          Decorrleated_Fraction<- numeric()
          Base_Fraction<- numeric()
          Unaltered_Fraction <- numeric()
          sparcity <- numeric()
          Average_Latent_Size  <- numeric()
          SigDe <- numeric()
          La_Significant <- numeric()
          pbKNNauc <- numeric()
          pbKNNacc <- numeric()
          for (thrs in thr)
          {
            print(thenames[[idx]])
            plotname <- paste(thenames[[idx]],thrs,sep="_")
            
  
            if (DeOut != "T_Driven")
            {
              DEdataframeTrain <- IDeA(dataframe,
                                                     thr=thrs,
                                                     method=meth,
                                                     type=typ,
                                                     corRank=corran,
                                                     verbose = FALSE)
            } else
            {
              DEdataframeTrain <- IDeA(dataframe,
                                                     Outcome=outcome,
                                                     thr=thrs,
                                                     method=meth,
                                                     type=typ,
                                                     corRank=corran,
                                                     verbose = FALSE)
            }
            demat <- attr(DEdataframeTrain,"UPSTM")
            DEdataframe <- predictDecorrelate(DEdataframeTrain,dataframeTest)
            
            totFe <- ncol(DEdataframe)-1
            totBa <- c(totBa,length(attr(DEdataframeTrain,"unaltered")))
            totDe <- c(totDe, sum(str_detect(colnames(DEdataframe),"La_")))
            toUn <- sum(apply(demat!=0,2,sum)==1)
            toUnmat <- c(toUnmat,toUn )
            una <-  totFe - ncol(demat) + toUn
            unaltered <- c(unaltered,una)
            Decorrleated_Fraction <- c(Decorrleated_Fraction,sum(str_detect(colnames(DEdataframe),"La_"))/totFe)
            Base_Fraction <- c(Base_Fraction,length(attr(DEdataframeTrain,"unaltered"))/totFe)
            
            Unaltered_Fraction <- c(Unaltered_Fraction,una/totFe)
            sparcity <- c(sparcity,(totFe-ncol(demat)+sum(abs(demat)!=0))/totFe/totFe)
            
            varlistDe <-  colnames(demat)[apply(demat!=0,2,sum)>1];
            varlistDe <- as.data.frame(cbind(name=varlistDe,desc=varlistDe))
            
            
            varlist_DeAll <- colnames(DEdataframe)
            varlist_DeAll <- varlist_DeAll[!(varlist_DeAll %in% c(outcome,"TimeToEvent"))]
            varlist_DeAll <- as.data.frame(cbind(name=varlist_DeAll,desc=varlist_DeAll))
            
  
            DEdataframeTime <- cbind(DEdataframeTrain,SurvTime=surTimeTest)
            
            
            pthr <- sig_pvalue/(ncol(dataframe)-1)
            
            pDe <- univariate_Logit(DEdataframeTime,formula("Surv(SurvTime,status)~."));
            topDecorNames <- names(pDe);
  
            dc <- getLatentCoefficients(DEdataframeTrain)
            deNames_in_dc <- topDecorNames[topDecorNames %in% names(dc)]
            selectedlist <- dc[deNames_in_dc]
            theDeFormulas <- selectedlist
            
            
            Average_Latent_Size <- c(Average_Latent_Size,length(unlist(theDeFormulas))/length(theDeFormulas))
            
            topSigDe <- topDecorNames
            
            pDeDe <- pDe[names(pDe) %in% varlistDe[,1]]
            pDeDe <- pDeDe[pDeDe<sig_pvalue]
            
            La_Significant <- c(La_Significant,length(topSigDe))
            SigDe <- c(SigDe,length(pDeDe))
  
            
            mlKNN <- KNN_method(formula(paste(outcome,"~.")),DEdataframeTrain[,c(outcome,topSigDe)])
            psb <- predictionStats_binary(cbind(dataframeTest[,outcome],
                                                  predict(mlKNN,
                                                  DEdataframe[,c(outcome,topSigDe)])),plotname,cex=0.6)
            pbKNNauc <- c(pbKNNauc,psb$aucs[1])
            pbKNNacc <- c(pbKNNacc,psb$accc[1])
          }
          totBaM <- rbind(totBaM,totBa)
          totDeM <- rbind(totDeM,totDe)
          toUnmatM <- rbind(toUnmatM,toUnmat)
          unalteredM <- rbind(unalteredM,unaltered)
          Decorrleated_FractionM <- rbind(Decorrleated_FractionM,Decorrleated_Fraction)
          Base_FractionM <- rbind(Base_FractionM,Base_Fraction)
          Unaltered_FractionM <- rbind(Unaltered_FractionM,Unaltered_Fraction)
          sparcityM <- rbind(sparcityM,sparcity)
          Average_Latent_SizeM <- rbind(Average_Latent_SizeM,Average_Latent_Size)
          SigDeM <- rbind(SigDeM,SigDe)
          La_SignificantM <- rbind(La_SignificantM,La_Significant)
          pbKNNaucM <- rbind(pbKNNaucM,pbKNNauc)
          pbKNNaccM <- rbind(pbKNNaccM,pbKNNacc)
  
        }
      }
    }
  }
}

[1] “T_Blind_fast_LM_FALSE” T_Blind_fast_LM_FALSE_0.05 [1] “T_Blind_fast_LM_FALSE” T_Blind_fast_LM_FALSE_0.2 [1] “T_Blind_fast_LM_FALSE” T_Blind_fast_LM_FALSE_0.4 [1] “T_Blind_fast_LM_FALSE” T_Blind_fast_LM_FALSE_0.6 [1] “T_Blind_fast_LM_FALSE” T_Blind_fast_LM_FALSE_0.8 [1] “T_Blind_fast_LM_FALSE” T_Blind_fast_LM_FALSE_0.95 [1] “T_Blind_fast_LM_TRUE” T_Blind_fast_LM_TRUE_0.05 [1] “T_Blind_fast_LM_TRUE” T_Blind_fast_LM_TRUE_0.2 [1] “T_Blind_fast_LM_TRUE” T_Blind_fast_LM_TRUE_0.4 [1] “T_Blind_fast_LM_TRUE” T_Blind_fast_LM_TRUE_0.6 [1] “T_Blind_fast_LM_TRUE” T_Blind_fast_LM_TRUE_0.8 [1] “T_Blind_fast_LM_TRUE” T_Blind_fast_LM_TRUE_0.95 [1] “T_Blind_fast_RLM_FALSE” T_Blind_fast_RLM_FALSE_0.05 [1] “T_Blind_fast_RLM_FALSE” T_Blind_fast_RLM_FALSE_0.2 [1] “T_Blind_fast_RLM_FALSE” T_Blind_fast_RLM_FALSE_0.4 [1] “T_Blind_fast_RLM_FALSE” T_Blind_fast_RLM_FALSE_0.6 [1] “T_Blind_fast_RLM_FALSE” T_Blind_fast_RLM_FALSE_0.8 [1] “T_Blind_fast_RLM_FALSE” T_Blind_fast_RLM_FALSE_0.95 [1] “T_Blind_fast_RLM_TRUE” T_Blind_fast_RLM_TRUE_0.05 [1] “T_Blind_fast_RLM_TRUE” T_Blind_fast_RLM_TRUE_0.2 [1] “T_Blind_fast_RLM_TRUE” T_Blind_fast_RLM_TRUE_0.4 [1] “T_Blind_fast_RLM_TRUE” T_Blind_fast_RLM_TRUE_0.6 [1] “T_Blind_fast_RLM_TRUE” T_Blind_fast_RLM_TRUE_0.8 [1] “T_Blind_fast_RLM_TRUE” T_Blind_fast_RLM_TRUE_0.95 [1] “T_Blind_pearson_LM_FALSE” T_Blind_pearson_LM_FALSE_0.05 [1] “T_Blind_pearson_LM_FALSE” T_Blind_pearson_LM_FALSE_0.2 [1] “T_Blind_pearson_LM_FALSE” T_Blind_pearson_LM_FALSE_0.4 [1] “T_Blind_pearson_LM_FALSE” T_Blind_pearson_LM_FALSE_0.6 [1] “T_Blind_pearson_LM_FALSE” T_Blind_pearson_LM_FALSE_0.8 [1] “T_Blind_pearson_LM_FALSE” T_Blind_pearson_LM_FALSE_0.95 [1] “T_Blind_pearson_LM_TRUE” T_Blind_pearson_LM_TRUE_0.05 [1] “T_Blind_pearson_LM_TRUE” T_Blind_pearson_LM_TRUE_0.2 [1] “T_Blind_pearson_LM_TRUE” T_Blind_pearson_LM_TRUE_0.4 [1] “T_Blind_pearson_LM_TRUE” T_Blind_pearson_LM_TRUE_0.6 [1] “T_Blind_pearson_LM_TRUE” T_Blind_pearson_LM_TRUE_0.8 [1] “T_Blind_pearson_LM_TRUE” T_Blind_pearson_LM_TRUE_0.95 [1] “T_Blind_pearson_RLM_FALSE” T_Blind_pearson_RLM_FALSE_0.05 [1] “T_Blind_pearson_RLM_FALSE” T_Blind_pearson_RLM_FALSE_0.2 [1] “T_Blind_pearson_RLM_FALSE” T_Blind_pearson_RLM_FALSE_0.4 [1] “T_Blind_pearson_RLM_FALSE” T_Blind_pearson_RLM_FALSE_0.6 [1] “T_Blind_pearson_RLM_FALSE” T_Blind_pearson_RLM_FALSE_0.8 [1] “T_Blind_pearson_RLM_FALSE” T_Blind_pearson_RLM_FALSE_0.95 [1] “T_Blind_pearson_RLM_TRUE” T_Blind_pearson_RLM_TRUE_0.05 [1] “T_Blind_pearson_RLM_TRUE” T_Blind_pearson_RLM_TRUE_0.2 [1] “T_Blind_pearson_RLM_TRUE” T_Blind_pearson_RLM_TRUE_0.4 [1] “T_Blind_pearson_RLM_TRUE” T_Blind_pearson_RLM_TRUE_0.6 [1] “T_Blind_pearson_RLM_TRUE” T_Blind_pearson_RLM_TRUE_0.8 [1] “T_Blind_pearson_RLM_TRUE” T_Blind_pearson_RLM_TRUE_0.95 [1] “T_Blind_spearman_LM_FALSE” T_Blind_spearman_LM_FALSE_0.05 [1] “T_Blind_spearman_LM_FALSE” T_Blind_spearman_LM_FALSE_0.2 [1] “T_Blind_spearman_LM_FALSE” T_Blind_spearman_LM_FALSE_0.4 [1] “T_Blind_spearman_LM_FALSE” T_Blind_spearman_LM_FALSE_0.6 [1] “T_Blind_spearman_LM_FALSE” T_Blind_spearman_LM_FALSE_0.8 [1] “T_Blind_spearman_LM_FALSE” T_Blind_spearman_LM_FALSE_0.95 [1] “T_Blind_spearman_LM_TRUE” T_Blind_spearman_LM_TRUE_0.05 [1] “T_Blind_spearman_LM_TRUE” T_Blind_spearman_LM_TRUE_0.2 [1] “T_Blind_spearman_LM_TRUE” T_Blind_spearman_LM_TRUE_0.4 [1] “T_Blind_spearman_LM_TRUE” T_Blind_spearman_LM_TRUE_0.6 [1] “T_Blind_spearman_LM_TRUE” T_Blind_spearman_LM_TRUE_0.8 [1] “T_Blind_spearman_LM_TRUE” T_Blind_spearman_LM_TRUE_0.95 [1] “T_Blind_spearman_RLM_FALSE” T_Blind_spearman_RLM_FALSE_0.05 [1] “T_Blind_spearman_RLM_FALSE” T_Blind_spearman_RLM_FALSE_0.2 [1] “T_Blind_spearman_RLM_FALSE” T_Blind_spearman_RLM_FALSE_0.4 [1] “T_Blind_spearman_RLM_FALSE” T_Blind_spearman_RLM_FALSE_0.6 [1] “T_Blind_spearman_RLM_FALSE” T_Blind_spearman_RLM_FALSE_0.8 [1] “T_Blind_spearman_RLM_FALSE” T_Blind_spearman_RLM_FALSE_0.95 [1] “T_Blind_spearman_RLM_TRUE” T_Blind_spearman_RLM_TRUE_0.05 [1] “T_Blind_spearman_RLM_TRUE” T_Blind_spearman_RLM_TRUE_0.2 [1] “T_Blind_spearman_RLM_TRUE” T_Blind_spearman_RLM_TRUE_0.4 [1] “T_Blind_spearman_RLM_TRUE” T_Blind_spearman_RLM_TRUE_0.6 [1] “T_Blind_spearman_RLM_TRUE” T_Blind_spearman_RLM_TRUE_0.8 [1] “T_Blind_spearman_RLM_TRUE” T_Blind_spearman_RLM_TRUE_0.95 [1] “T_Driven_fast_LM_FALSE” T_Driven_fast_LM_FALSE_0.05 [1] “T_Driven_fast_LM_FALSE” T_Driven_fast_LM_FALSE_0.2 [1] “T_Driven_fast_LM_FALSE” T_Driven_fast_LM_FALSE_0.4 [1] “T_Driven_fast_LM_FALSE” T_Driven_fast_LM_FALSE_0.6 [1] “T_Driven_fast_LM_FALSE” T_Driven_fast_LM_FALSE_0.8 [1] “T_Driven_fast_LM_FALSE” T_Driven_fast_LM_FALSE_0.95 [1] “T_Driven_fast_LM_TRUE” T_Driven_fast_LM_TRUE_0.05 [1] “T_Driven_fast_LM_TRUE” T_Driven_fast_LM_TRUE_0.2 [1] “T_Driven_fast_LM_TRUE” T_Driven_fast_LM_TRUE_0.4 [1] “T_Driven_fast_LM_TRUE” T_Driven_fast_LM_TRUE_0.6 [1] “T_Driven_fast_LM_TRUE” T_Driven_fast_LM_TRUE_0.8 [1] “T_Driven_fast_LM_TRUE” T_Driven_fast_LM_TRUE_0.95 [1] “T_Driven_fast_RLM_FALSE” T_Driven_fast_RLM_FALSE_0.05 [1] “T_Driven_fast_RLM_FALSE” T_Driven_fast_RLM_FALSE_0.2 [1] “T_Driven_fast_RLM_FALSE” T_Driven_fast_RLM_FALSE_0.4 [1] “T_Driven_fast_RLM_FALSE” T_Driven_fast_RLM_FALSE_0.6 [1] “T_Driven_fast_RLM_FALSE” T_Driven_fast_RLM_FALSE_0.8 [1] “T_Driven_fast_RLM_FALSE” T_Driven_fast_RLM_FALSE_0.95 [1] “T_Driven_fast_RLM_TRUE” T_Driven_fast_RLM_TRUE_0.05 [1] “T_Driven_fast_RLM_TRUE” T_Driven_fast_RLM_TRUE_0.2 [1] “T_Driven_fast_RLM_TRUE” T_Driven_fast_RLM_TRUE_0.4 [1] “T_Driven_fast_RLM_TRUE” T_Driven_fast_RLM_TRUE_0.6 [1] “T_Driven_fast_RLM_TRUE” T_Driven_fast_RLM_TRUE_0.8 [1] “T_Driven_fast_RLM_TRUE” T_Driven_fast_RLM_TRUE_0.95 [1] “T_Driven_pearson_LM_FALSE” T_Driven_pearson_LM_FALSE_0.05 [1] “T_Driven_pearson_LM_FALSE” T_Driven_pearson_LM_FALSE_0.2 [1] “T_Driven_pearson_LM_FALSE” T_Driven_pearson_LM_FALSE_0.4 [1] “T_Driven_pearson_LM_FALSE” T_Driven_pearson_LM_FALSE_0.6 [1] “T_Driven_pearson_LM_FALSE” T_Driven_pearson_LM_FALSE_0.8 [1] “T_Driven_pearson_LM_FALSE” T_Driven_pearson_LM_FALSE_0.95 [1] “T_Driven_pearson_LM_TRUE” T_Driven_pearson_LM_TRUE_0.05 [1] “T_Driven_pearson_LM_TRUE” T_Driven_pearson_LM_TRUE_0.2 [1] “T_Driven_pearson_LM_TRUE” T_Driven_pearson_LM_TRUE_0.4 [1] “T_Driven_pearson_LM_TRUE” T_Driven_pearson_LM_TRUE_0.6 [1] “T_Driven_pearson_LM_TRUE” T_Driven_pearson_LM_TRUE_0.8 [1] “T_Driven_pearson_LM_TRUE” T_Driven_pearson_LM_TRUE_0.95 [1] “T_Driven_pearson_RLM_FALSE” T_Driven_pearson_RLM_FALSE_0.05 [1] “T_Driven_pearson_RLM_FALSE” T_Driven_pearson_RLM_FALSE_0.2 [1] “T_Driven_pearson_RLM_FALSE” T_Driven_pearson_RLM_FALSE_0.4 [1] “T_Driven_pearson_RLM_FALSE” T_Driven_pearson_RLM_FALSE_0.6 [1] “T_Driven_pearson_RLM_FALSE” T_Driven_pearson_RLM_FALSE_0.8 [1] “T_Driven_pearson_RLM_FALSE” T_Driven_pearson_RLM_FALSE_0.95 [1] “T_Driven_pearson_RLM_TRUE” T_Driven_pearson_RLM_TRUE_0.05 [1] “T_Driven_pearson_RLM_TRUE” T_Driven_pearson_RLM_TRUE_0.2 [1] “T_Driven_pearson_RLM_TRUE” T_Driven_pearson_RLM_TRUE_0.4 [1] “T_Driven_pearson_RLM_TRUE” T_Driven_pearson_RLM_TRUE_0.6 [1] “T_Driven_pearson_RLM_TRUE” T_Driven_pearson_RLM_TRUE_0.8 [1] “T_Driven_pearson_RLM_TRUE” T_Driven_pearson_RLM_TRUE_0.95 [1] “T_Driven_spearman_LM_FALSE” T_Driven_spearman_LM_FALSE_0.05 [1] “T_Driven_spearman_LM_FALSE” T_Driven_spearman_LM_FALSE_0.2 [1] “T_Driven_spearman_LM_FALSE” T_Driven_spearman_LM_FALSE_0.4 [1] “T_Driven_spearman_LM_FALSE” T_Driven_spearman_LM_FALSE_0.6 [1] “T_Driven_spearman_LM_FALSE” T_Driven_spearman_LM_FALSE_0.8 [1] “T_Driven_spearman_LM_FALSE” T_Driven_spearman_LM_FALSE_0.95 [1] “T_Driven_spearman_LM_TRUE” T_Driven_spearman_LM_TRUE_0.05 [1] “T_Driven_spearman_LM_TRUE” T_Driven_spearman_LM_TRUE_0.2 [1] “T_Driven_spearman_LM_TRUE” T_Driven_spearman_LM_TRUE_0.4 [1] “T_Driven_spearman_LM_TRUE” T_Driven_spearman_LM_TRUE_0.6 [1] “T_Driven_spearman_LM_TRUE” T_Driven_spearman_LM_TRUE_0.8 [1] “T_Driven_spearman_LM_TRUE” T_Driven_spearman_LM_TRUE_0.95 [1] “T_Driven_spearman_RLM_FALSE” T_Driven_spearman_RLM_FALSE_0.05 [1] “T_Driven_spearman_RLM_FALSE” T_Driven_spearman_RLM_FALSE_0.2 [1] “T_Driven_spearman_RLM_FALSE” T_Driven_spearman_RLM_FALSE_0.4 [1] “T_Driven_spearman_RLM_FALSE” T_Driven_spearman_RLM_FALSE_0.6 [1] “T_Driven_spearman_RLM_FALSE” T_Driven_spearman_RLM_FALSE_0.8 [1] “T_Driven_spearman_RLM_FALSE” T_Driven_spearman_RLM_FALSE_0.95 [1] “T_Driven_spearman_RLM_TRUE” T_Driven_spearman_RLM_TRUE_0.05 [1] “T_Driven_spearman_RLM_TRUE” T_Driven_spearman_RLM_TRUE_0.2 [1] “T_Driven_spearman_RLM_TRUE” T_Driven_spearman_RLM_TRUE_0.4 [1] “T_Driven_spearman_RLM_TRUE” T_Driven_spearman_RLM_TRUE_0.6 [1] “T_Driven_spearman_RLM_TRUE” T_Driven_spearman_RLM_TRUE_0.8 [1] “T_Driven_spearman_RLM_TRUE” T_Driven_spearman_RLM_TRUE_0.95

par(op)

2.2.1 Printing the analysis outputs

par(op)
par(mfrow=c(1,2),cex=0.6)

rownames(totBaM) <- thenames
rownames(totDeM) <- thenames
rownames(toUnmatM) <- thenames
rownames(unalteredM) <- thenames
rownames(Decorrleated_FractionM) <- thenames
rownames(Base_FractionM) <- thenames
rownames(Unaltered_FractionM) <- thenames
rownames(sparcityM) <- thenames
rownames(Average_Latent_SizeM) <- thenames
rownames(SigDeM) <- thenames
rownames(La_SignificantM) <- thenames
rownames(pbKNNaucM) <- thenames
rownames(pbKNNaccM) <- thenames

colnames(totBaM) <- thr
colnames(totDeM) <- thr
colnames(toUnmatM) <- thr
colnames(unalteredM) <- thr
colnames(Decorrleated_FractionM) <- thr
colnames(Base_FractionM) <- thr
colnames(Unaltered_FractionM) <- thr
colnames(sparcityM) <- thr
colnames(Average_Latent_SizeM) <- thr
colnames(SigDeM) <- thr
colnames(La_SignificantM) <- thr
colnames(pbKNNaucM) <- thr
colnames(pbKNNaccM) <- thr

pander::pander(totFe)

327


pander::pander(totBaM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 4 48 65 69 23 4
T_Blind_fast_LM_TRUE 24 36 48 59 22 4
T_Blind_fast_RLM_FALSE 4 48 65 69 23 4
T_Blind_fast_RLM_TRUE 24 36 48 59 22 4
T_Blind_pearson_LM_FALSE 5 48 65 69 23 4
T_Blind_pearson_LM_TRUE 23 36 48 59 22 4
T_Blind_pearson_RLM_FALSE 50 53 64 69 23 4
T_Blind_pearson_RLM_TRUE 33 36 45 58 22 4
T_Blind_spearman_LM_FALSE 38 45 62 62 22 3
T_Blind_spearman_LM_TRUE 24 44 46 43 22 3
T_Blind_spearman_RLM_FALSE 52 59 60 61 23 3
T_Blind_spearman_RLM_TRUE 37 43 48 45 23 3
T_Driven_fast_LM_FALSE 61 47 66 70 23 4
T_Driven_fast_LM_TRUE 14 36 54 54 21 4
T_Driven_fast_RLM_FALSE 61 47 66 70 23 4
T_Driven_fast_RLM_TRUE 14 36 54 54 21 4
T_Driven_pearson_LM_FALSE 59 46 66 70 23 4
T_Driven_pearson_LM_TRUE 4 36 54 54 21 4
T_Driven_pearson_RLM_FALSE 64 51 62 72 23 4
T_Driven_pearson_RLM_TRUE 43 42 54 55 21 4
T_Driven_spearman_LM_FALSE 55 58 61 62 20 3
T_Driven_spearman_LM_TRUE 37 53 49 47 20 3
T_Driven_spearman_RLM_FALSE 55 54 61 63 21 3
T_Driven_spearman_RLM_TRUE 43 47 51 46 21 3
pander::pander(totDeM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 320 241 180 124 30 4
T_Blind_fast_LM_TRUE 246 255 197 130 33 4
T_Blind_fast_RLM_FALSE 320 241 180 124 30 4
T_Blind_fast_RLM_TRUE 246 255 197 130 33 4
T_Blind_pearson_LM_FALSE 319 241 180 124 30 4
T_Blind_pearson_LM_TRUE 253 255 197 130 33 4
T_Blind_pearson_RLM_FALSE 216 211 179 124 30 4
T_Blind_pearson_RLM_TRUE 226 229 200 130 33 4
T_Blind_spearman_LM_FALSE 209 219 171 113 25 3
T_Blind_spearman_LM_TRUE 231 229 189 122 32 3
T_Blind_spearman_RLM_FALSE 191 197 175 113 25 3
T_Blind_spearman_RLM_TRUE 215 219 187 120 32 3
T_Driven_fast_LM_FALSE 196 240 177 119 32 4
T_Driven_fast_LM_TRUE 298 255 191 127 33 4
T_Driven_fast_RLM_FALSE 196 240 177 119 32 4
T_Driven_fast_RLM_TRUE 298 255 191 127 33 4
T_Driven_pearson_LM_FALSE 198 241 177 119 32 4
T_Driven_pearson_LM_TRUE 321 255 191 127 33 4
T_Driven_pearson_RLM_FALSE 188 214 183 116 32 4
T_Driven_pearson_RLM_TRUE 211 221 192 127 33 4
T_Driven_spearman_LM_FALSE 178 198 174 107 25 3
T_Driven_spearman_LM_TRUE 199 211 183 119 32 3
T_Driven_spearman_RLM_FALSE 189 201 175 107 25 3
T_Driven_spearman_RLM_TRUE 210 213 185 119 32 3
pander::pander(toUnmatM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 4 48 65 69 23 4
T_Blind_fast_LM_TRUE 24 36 48 59 22 4
T_Blind_fast_RLM_FALSE 4 48 65 69 23 4
T_Blind_fast_RLM_TRUE 24 36 48 59 22 4
T_Blind_pearson_LM_FALSE 5 48 65 69 23 4
T_Blind_pearson_LM_TRUE 23 36 48 59 22 4
T_Blind_pearson_RLM_FALSE 50 53 64 69 23 4
T_Blind_pearson_RLM_TRUE 33 36 45 58 22 4
T_Blind_spearman_LM_FALSE 38 45 62 62 22 3
T_Blind_spearman_LM_TRUE 24 44 46 43 22 3
T_Blind_spearman_RLM_FALSE 52 59 60 61 23 3
T_Blind_spearman_RLM_TRUE 37 43 48 45 23 3
T_Driven_fast_LM_FALSE 61 47 66 70 23 4
T_Driven_fast_LM_TRUE 14 36 54 54 21 4
T_Driven_fast_RLM_FALSE 61 47 66 70 23 4
T_Driven_fast_RLM_TRUE 14 36 54 54 21 4
T_Driven_pearson_LM_FALSE 59 46 66 70 23 4
T_Driven_pearson_LM_TRUE 4 36 54 54 21 4
T_Driven_pearson_RLM_FALSE 64 51 62 72 23 4
T_Driven_pearson_RLM_TRUE 43 42 54 55 21 4
T_Driven_spearman_LM_FALSE 55 58 61 62 20 3
T_Driven_spearman_LM_TRUE 37 53 49 47 20 3
T_Driven_spearman_RLM_FALSE 55 54 61 63 21 3
T_Driven_spearman_RLM_TRUE 43 47 51 46 21 3
pander::pander(unalteredM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 7 86 147 203 297 323
T_Blind_fast_LM_TRUE 81 72 130 197 294 323
T_Blind_fast_RLM_FALSE 7 86 147 203 297 323
T_Blind_fast_RLM_TRUE 81 72 130 197 294 323
T_Blind_pearson_LM_FALSE 8 86 147 203 297 323
T_Blind_pearson_LM_TRUE 74 72 130 197 294 323
T_Blind_pearson_RLM_FALSE 111 116 148 203 297 323
T_Blind_pearson_RLM_TRUE 101 98 127 197 294 323
T_Blind_spearman_LM_FALSE 118 108 156 214 302 324
T_Blind_spearman_LM_TRUE 96 98 138 205 295 324
T_Blind_spearman_RLM_FALSE 136 130 152 214 302 324
T_Blind_spearman_RLM_TRUE 112 108 140 207 295 324
T_Driven_fast_LM_FALSE 131 87 150 208 295 323
T_Driven_fast_LM_TRUE 29 72 136 200 294 323
T_Driven_fast_RLM_FALSE 131 87 150 208 295 323
T_Driven_fast_RLM_TRUE 29 72 136 200 294 323
T_Driven_pearson_LM_FALSE 129 86 150 208 295 323
T_Driven_pearson_LM_TRUE 6 72 136 200 294 323
T_Driven_pearson_RLM_FALSE 139 113 144 211 295 323
T_Driven_pearson_RLM_TRUE 116 106 135 200 294 323
T_Driven_spearman_LM_FALSE 149 129 153 220 302 324
T_Driven_spearman_LM_TRUE 128 116 144 208 295 324
T_Driven_spearman_RLM_FALSE 138 126 152 220 302 324
T_Driven_spearman_RLM_TRUE 117 114 142 208 295 324
pander::pander(Decorrleated_FractionM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 0.979 0.737 0.550 0.379 0.0917 0.01223
T_Blind_fast_LM_TRUE 0.752 0.780 0.602 0.398 0.1009 0.01223
T_Blind_fast_RLM_FALSE 0.979 0.737 0.550 0.379 0.0917 0.01223
T_Blind_fast_RLM_TRUE 0.752 0.780 0.602 0.398 0.1009 0.01223
T_Blind_pearson_LM_FALSE 0.976 0.737 0.550 0.379 0.0917 0.01223
T_Blind_pearson_LM_TRUE 0.774 0.780 0.602 0.398 0.1009 0.01223
T_Blind_pearson_RLM_FALSE 0.661 0.645 0.547 0.379 0.0917 0.01223
T_Blind_pearson_RLM_TRUE 0.691 0.700 0.612 0.398 0.1009 0.01223
T_Blind_spearman_LM_FALSE 0.639 0.670 0.523 0.346 0.0765 0.00917
T_Blind_spearman_LM_TRUE 0.706 0.700 0.578 0.373 0.0979 0.00917
T_Blind_spearman_RLM_FALSE 0.584 0.602 0.535 0.346 0.0765 0.00917
T_Blind_spearman_RLM_TRUE 0.657 0.670 0.572 0.367 0.0979 0.00917
T_Driven_fast_LM_FALSE 0.599 0.734 0.541 0.364 0.0979 0.01223
T_Driven_fast_LM_TRUE 0.911 0.780 0.584 0.388 0.1009 0.01223
T_Driven_fast_RLM_FALSE 0.599 0.734 0.541 0.364 0.0979 0.01223
T_Driven_fast_RLM_TRUE 0.911 0.780 0.584 0.388 0.1009 0.01223
T_Driven_pearson_LM_FALSE 0.606 0.737 0.541 0.364 0.0979 0.01223
T_Driven_pearson_LM_TRUE 0.982 0.780 0.584 0.388 0.1009 0.01223
T_Driven_pearson_RLM_FALSE 0.575 0.654 0.560 0.355 0.0979 0.01223
T_Driven_pearson_RLM_TRUE 0.645 0.676 0.587 0.388 0.1009 0.01223
T_Driven_spearman_LM_FALSE 0.544 0.606 0.532 0.327 0.0765 0.00917
T_Driven_spearman_LM_TRUE 0.609 0.645 0.560 0.364 0.0979 0.00917
T_Driven_spearman_RLM_FALSE 0.578 0.615 0.535 0.327 0.0765 0.00917
T_Driven_spearman_RLM_TRUE 0.642 0.651 0.566 0.364 0.0979 0.00917
pander::pander(Base_FractionM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 0.0122 0.147 0.199 0.211 0.0703 0.01223
T_Blind_fast_LM_TRUE 0.0734 0.110 0.147 0.180 0.0673 0.01223
T_Blind_fast_RLM_FALSE 0.0122 0.147 0.199 0.211 0.0703 0.01223
T_Blind_fast_RLM_TRUE 0.0734 0.110 0.147 0.180 0.0673 0.01223
T_Blind_pearson_LM_FALSE 0.0153 0.147 0.199 0.211 0.0703 0.01223
T_Blind_pearson_LM_TRUE 0.0703 0.110 0.147 0.180 0.0673 0.01223
T_Blind_pearson_RLM_FALSE 0.1529 0.162 0.196 0.211 0.0703 0.01223
T_Blind_pearson_RLM_TRUE 0.1009 0.110 0.138 0.177 0.0673 0.01223
T_Blind_spearman_LM_FALSE 0.1162 0.138 0.190 0.190 0.0673 0.00917
T_Blind_spearman_LM_TRUE 0.0734 0.135 0.141 0.131 0.0673 0.00917
T_Blind_spearman_RLM_FALSE 0.1590 0.180 0.183 0.187 0.0703 0.00917
T_Blind_spearman_RLM_TRUE 0.1131 0.131 0.147 0.138 0.0703 0.00917
T_Driven_fast_LM_FALSE 0.1865 0.144 0.202 0.214 0.0703 0.01223
T_Driven_fast_LM_TRUE 0.0428 0.110 0.165 0.165 0.0642 0.01223
T_Driven_fast_RLM_FALSE 0.1865 0.144 0.202 0.214 0.0703 0.01223
T_Driven_fast_RLM_TRUE 0.0428 0.110 0.165 0.165 0.0642 0.01223
T_Driven_pearson_LM_FALSE 0.1804 0.141 0.202 0.214 0.0703 0.01223
T_Driven_pearson_LM_TRUE 0.0122 0.110 0.165 0.165 0.0642 0.01223
T_Driven_pearson_RLM_FALSE 0.1957 0.156 0.190 0.220 0.0703 0.01223
T_Driven_pearson_RLM_TRUE 0.1315 0.128 0.165 0.168 0.0642 0.01223
T_Driven_spearman_LM_FALSE 0.1682 0.177 0.187 0.190 0.0612 0.00917
T_Driven_spearman_LM_TRUE 0.1131 0.162 0.150 0.144 0.0612 0.00917
T_Driven_spearman_RLM_FALSE 0.1682 0.165 0.187 0.193 0.0642 0.00917
T_Driven_spearman_RLM_TRUE 0.1315 0.144 0.156 0.141 0.0642 0.00917
pander::pander(Unaltered_FractionM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 0.0214 0.263 0.450 0.621 0.908 0.988
T_Blind_fast_LM_TRUE 0.2477 0.220 0.398 0.602 0.899 0.988
T_Blind_fast_RLM_FALSE 0.0214 0.263 0.450 0.621 0.908 0.988
T_Blind_fast_RLM_TRUE 0.2477 0.220 0.398 0.602 0.899 0.988
T_Blind_pearson_LM_FALSE 0.0245 0.263 0.450 0.621 0.908 0.988
T_Blind_pearson_LM_TRUE 0.2263 0.220 0.398 0.602 0.899 0.988
T_Blind_pearson_RLM_FALSE 0.3394 0.355 0.453 0.621 0.908 0.988
T_Blind_pearson_RLM_TRUE 0.3089 0.300 0.388 0.602 0.899 0.988
T_Blind_spearman_LM_FALSE 0.3609 0.330 0.477 0.654 0.924 0.991
T_Blind_spearman_LM_TRUE 0.2936 0.300 0.422 0.627 0.902 0.991
T_Blind_spearman_RLM_FALSE 0.4159 0.398 0.465 0.654 0.924 0.991
T_Blind_spearman_RLM_TRUE 0.3425 0.330 0.428 0.633 0.902 0.991
T_Driven_fast_LM_FALSE 0.4006 0.266 0.459 0.636 0.902 0.988
T_Driven_fast_LM_TRUE 0.0887 0.220 0.416 0.612 0.899 0.988
T_Driven_fast_RLM_FALSE 0.4006 0.266 0.459 0.636 0.902 0.988
T_Driven_fast_RLM_TRUE 0.0887 0.220 0.416 0.612 0.899 0.988
T_Driven_pearson_LM_FALSE 0.3945 0.263 0.459 0.636 0.902 0.988
T_Driven_pearson_LM_TRUE 0.0183 0.220 0.416 0.612 0.899 0.988
T_Driven_pearson_RLM_FALSE 0.4251 0.346 0.440 0.645 0.902 0.988
T_Driven_pearson_RLM_TRUE 0.3547 0.324 0.413 0.612 0.899 0.988
T_Driven_spearman_LM_FALSE 0.4557 0.394 0.468 0.673 0.924 0.991
T_Driven_spearman_LM_TRUE 0.3914 0.355 0.440 0.636 0.902 0.991
T_Driven_spearman_RLM_FALSE 0.4220 0.385 0.465 0.673 0.924 0.991
T_Driven_spearman_RLM_TRUE 0.3578 0.349 0.434 0.636 0.902 0.991
pander::pander(sparcityM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 0.34368 0.04076 0.00666 0.00465 0.00338 0.00310
T_Blind_fast_LM_TRUE 0.01914 0.06419 0.00795 0.00483 0.00340 0.00310
T_Blind_fast_RLM_FALSE 0.34368 0.04076 0.00666 0.00465 0.00338 0.00310
T_Blind_fast_RLM_TRUE 0.01914 0.06419 0.00795 0.00483 0.00340 0.00310
T_Blind_pearson_LM_FALSE 0.36673 0.04076 0.00666 0.00465 0.00338 0.00310
T_Blind_pearson_LM_TRUE 0.02012 0.06419 0.00795 0.00483 0.00340 0.00310
T_Blind_pearson_RLM_FALSE 0.01009 0.01056 0.00706 0.00468 0.00338 0.00310
T_Blind_pearson_RLM_TRUE 0.00899 0.01011 0.00837 0.00483 0.00340 0.00310
T_Blind_spearman_LM_FALSE 0.00790 0.03341 0.00696 0.00450 0.00334 0.00309
T_Blind_spearman_LM_TRUE 0.01390 0.03865 0.00835 0.00462 0.00341 0.00309
T_Blind_spearman_RLM_FALSE 0.00775 0.00867 0.00738 0.00450 0.00335 0.00309
T_Blind_spearman_RLM_TRUE 0.01076 0.01001 0.00772 0.00467 0.00342 0.00309
T_Driven_fast_LM_FALSE 0.00798 0.04196 0.00689 0.00454 0.00339 0.00310
T_Driven_fast_LM_TRUE 0.07902 0.06023 0.00778 0.00452 0.00339 0.00310
T_Driven_fast_RLM_FALSE 0.00798 0.04196 0.00689 0.00454 0.00339 0.00310
T_Driven_fast_RLM_TRUE 0.07902 0.06023 0.00778 0.00452 0.00339 0.00310
T_Driven_pearson_LM_FALSE 0.00822 0.04234 0.00689 0.00454 0.00339 0.00310
T_Driven_pearson_LM_TRUE 0.19312 0.06023 0.00778 0.00452 0.00339 0.00310
T_Driven_pearson_RLM_FALSE 0.00722 0.00916 0.00714 0.00450 0.00339 0.00310
T_Driven_pearson_RLM_TRUE 0.00835 0.01034 0.00774 0.00456 0.00339 0.00310
T_Driven_spearman_LM_FALSE 0.00659 0.00772 0.00633 0.00437 0.00331 0.00309
T_Driven_spearman_LM_TRUE 0.00823 0.00852 0.00812 0.00446 0.00339 0.00309
T_Driven_spearman_RLM_FALSE 0.00762 0.00850 0.00685 0.00435 0.00332 0.00309
T_Driven_spearman_RLM_TRUE 0.00926 0.00860 0.00777 0.00445 0.00339 0.00309
pander::pander(Average_Latent_SizeM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 121.85 19.74 2.84 2.33 2.09 2
T_Blind_fast_LM_TRUE 6.78 29.04 3.39 2.55 2.09 2
T_Blind_fast_RLM_FALSE 121.85 19.74 2.84 2.33 2.09 2
T_Blind_fast_RLM_TRUE 6.78 29.04 3.39 2.55 2.09 2
T_Blind_pearson_LM_FALSE 115.17 19.74 2.84 2.33 2.09 2
T_Blind_pearson_LM_TRUE 6.83 29.04 3.39 2.55 2.09 2
T_Blind_pearson_RLM_FALSE 5.07 5.94 3.72 2.36 2.10 2
T_Blind_pearson_RLM_TRUE 3.31 4.45 3.94 2.55 2.08 2
T_Blind_spearman_LM_FALSE 3.52 13.94 4.16 2.39 2.18 2
T_Blind_spearman_LM_TRUE 6.19 14.27 3.85 2.39 2.25 2
T_Blind_spearman_RLM_FALSE 3.98 4.77 3.71 2.41 2.30 2
T_Blind_spearman_RLM_TRUE 4.09 3.57 3.76 2.45 2.31 2
T_Driven_fast_LM_FALSE 4.77 18.68 3.76 2.34 2.09 2
T_Driven_fast_LM_TRUE 22.22 29.11 4.09 2.14 2.09 2
T_Driven_fast_RLM_FALSE 4.77 18.68 3.76 2.34 2.09 2
T_Driven_fast_RLM_TRUE 22.22 29.11 4.09 2.14 2.09 2
T_Driven_pearson_LM_FALSE 5.39 19.91 3.76 2.34 2.09 2
T_Driven_pearson_LM_TRUE 67.38 29.11 4.09 2.14 2.09 2
T_Driven_pearson_RLM_FALSE 3.55 4.65 3.62 2.42 2.09 2
T_Driven_pearson_RLM_TRUE 3.78 5.17 3.67 2.14 2.08 2
T_Driven_spearman_LM_FALSE 3.00 4.58 3.21 2.33 2.12 NA
T_Driven_spearman_LM_TRUE 3.72 3.69 3.62 2.27 2.17 NA
T_Driven_spearman_RLM_FALSE 4.50 5.25 3.63 2.38 2.25 2
T_Driven_spearman_RLM_TRUE 3.83 3.74 3.37 2.30 2.23 2
pander::pander(SigDeM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 6 7 9 11 2 1
T_Blind_fast_LM_TRUE 6 6 7 18 7 1
T_Blind_fast_RLM_FALSE 6 7 9 11 2 1
T_Blind_fast_RLM_TRUE 6 6 7 18 7 1
T_Blind_pearson_LM_FALSE 6 7 9 11 2 1
T_Blind_pearson_LM_TRUE 6 6 7 18 7 1
T_Blind_pearson_RLM_FALSE 10 10 12 11 2 1
T_Blind_pearson_RLM_TRUE 13 9 11 23 7 1
T_Blind_spearman_LM_FALSE 11 7 12 11 3 0
T_Blind_spearman_LM_TRUE 8 3 12 24 3 0
T_Blind_spearman_RLM_FALSE 10 11 8 11 3 0
T_Blind_spearman_RLM_TRUE 10 13 9 24 3 0
T_Driven_fast_LM_FALSE 2 2 8 7 0 1
T_Driven_fast_LM_TRUE 1 2 10 9 5 1
T_Driven_fast_RLM_FALSE 2 2 8 7 0 1
T_Driven_fast_RLM_TRUE 1 2 10 9 5 1
T_Driven_pearson_LM_FALSE 1 2 8 7 0 1
T_Driven_pearson_LM_TRUE 1 2 10 9 5 1
T_Driven_pearson_RLM_FALSE 7 7 10 9 0 0
T_Driven_pearson_RLM_TRUE 7 6 11 10 4 0
T_Driven_spearman_LM_FALSE 2 2 5 7 1 0
T_Driven_spearman_LM_TRUE 2 1 5 11 1 0
T_Driven_spearman_RLM_FALSE 12 7 7 6 0 0
T_Driven_spearman_RLM_TRUE 5 5 6 11 1 0
pander::pander(La_SignificantM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 20 31 61 90 143 157
T_Blind_fast_LM_TRUE 29 30 61 101 139 157
T_Blind_fast_RLM_FALSE 20 31 61 90 143 157
T_Blind_fast_RLM_TRUE 29 30 61 101 139 157
T_Blind_pearson_LM_FALSE 18 31 61 90 143 157
T_Blind_pearson_LM_TRUE 30 30 61 101 139 157
T_Blind_pearson_RLM_FALSE 71 69 82 88 142 157
T_Blind_pearson_RLM_TRUE 47 54 67 101 141 157
T_Blind_spearman_LM_FALSE 53 45 74 92 143 157
T_Blind_spearman_LM_TRUE 29 34 59 117 135 157
T_Blind_spearman_RLM_FALSE 65 65 65 93 142 157
T_Blind_spearman_RLM_TRUE 43 49 71 116 136 157
T_Driven_fast_LM_FALSE 32 32 60 107 142 156
T_Driven_fast_LM_TRUE 10 25 69 104 141 156
T_Driven_fast_RLM_FALSE 32 32 60 107 142 156
T_Driven_fast_RLM_TRUE 10 25 69 104 141 156
T_Driven_pearson_LM_FALSE 26 32 60 107 142 156
T_Driven_pearson_LM_TRUE 9 25 69 104 141 156
T_Driven_pearson_RLM_FALSE 61 59 68 116 142 157
T_Driven_pearson_RLM_TRUE 51 52 63 107 142 157
T_Driven_spearman_LM_FALSE 13 65 65 107 141 156
T_Driven_spearman_LM_TRUE 26 37 67 113 136 156
T_Driven_spearman_RLM_FALSE 57 55 60 113 141 157
T_Driven_spearman_RLM_TRUE 39 44 64 119 137 157
pander::pander(pbKNNaucM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 0.728 0.727 0.768 0.772 0.773 0.771
T_Blind_fast_LM_TRUE 0.743 0.744 0.744 0.768 0.774 0.771
T_Blind_fast_RLM_FALSE 0.728 0.727 0.768 0.772 0.773 0.771
T_Blind_fast_RLM_TRUE 0.743 0.744 0.744 0.768 0.774 0.771
T_Blind_pearson_LM_FALSE 0.751 0.727 0.768 0.772 0.773 0.771
T_Blind_pearson_LM_TRUE 0.744 0.744 0.744 0.768 0.774 0.771
T_Blind_pearson_RLM_FALSE 0.747 0.753 0.776 0.768 0.774 0.769
T_Blind_pearson_RLM_TRUE 0.737 0.743 0.736 0.772 0.763 0.769
T_Blind_spearman_LM_FALSE 0.765 0.775 0.771 0.773 0.783 0.772
T_Blind_spearman_LM_TRUE 0.745 0.755 0.774 0.756 0.783 0.772
T_Blind_spearman_RLM_FALSE 0.743 0.754 0.779 0.749 0.788 0.774
T_Blind_spearman_RLM_TRUE 0.783 0.759 0.780 0.766 0.774 0.774
T_Driven_fast_LM_FALSE 0.754 0.725 0.757 0.772 0.786 0.764
T_Driven_fast_LM_TRUE 0.707 0.723 0.731 0.779 0.769 0.764
T_Driven_fast_RLM_FALSE 0.754 0.725 0.757 0.772 0.786 0.764
T_Driven_fast_RLM_TRUE 0.707 0.723 0.731 0.779 0.769 0.764
T_Driven_pearson_LM_FALSE 0.777 0.723 0.757 0.772 0.786 0.764
T_Driven_pearson_LM_TRUE 0.715 0.723 0.731 0.779 0.769 0.764
T_Driven_pearson_RLM_FALSE 0.785 0.765 0.770 0.759 0.781 0.769
T_Driven_pearson_RLM_TRUE 0.741 0.750 0.776 0.758 0.768 0.769
T_Driven_spearman_LM_FALSE 0.764 0.740 0.766 0.779 0.782 0.771
T_Driven_spearman_LM_TRUE 0.747 0.766 0.747 0.764 0.780 0.771
T_Driven_spearman_RLM_FALSE 0.759 0.738 0.783 0.770 0.783 0.773
T_Driven_spearman_RLM_TRUE 0.756 0.784 0.758 0.761 0.769 0.773
pander::pander(pbKNNaccM)
  0.05 0.2 0.4 0.6 0.8 0.95
T_Blind_fast_LM_FALSE 0.674 0.706 0.715 0.694 0.697 0.685
T_Blind_fast_LM_TRUE 0.7 0.709 0.682 0.7 0.709 0.685
T_Blind_fast_RLM_FALSE 0.674 0.706 0.715 0.694 0.697 0.685
T_Blind_fast_RLM_TRUE 0.7 0.709 0.682 0.7 0.709 0.685
T_Blind_pearson_LM_FALSE 0.697 0.706 0.715 0.694 0.697 0.685
T_Blind_pearson_LM_TRUE 0.7 0.709 0.682 0.7 0.709 0.685
T_Blind_pearson_RLM_FALSE 0.709 0.712 0.718 0.694 0.694 0.691
T_Blind_pearson_RLM_TRUE 0.688 0.7 0.697 0.715 0.697 0.691
T_Blind_spearman_LM_FALSE 0.7 0.721 0.703 0.724 0.724 0.694
T_Blind_spearman_LM_TRUE 0.706 0.721 0.712 0.694 0.724 0.694
T_Blind_spearman_RLM_FALSE 0.697 0.671 0.724 0.697 0.721 0.697
T_Blind_spearman_RLM_TRUE 0.724 0.691 0.718 0.709 0.726 0.697
T_Driven_fast_LM_FALSE 0.691 0.682 0.703 0.703 0.712 0.697
T_Driven_fast_LM_TRUE 0.718 0.718 0.688 0.706 0.709 0.697
T_Driven_fast_RLM_FALSE 0.691 0.682 0.703 0.703 0.712 0.697
T_Driven_fast_RLM_TRUE 0.718 0.718 0.688 0.706 0.709 0.697
T_Driven_pearson_LM_FALSE 0.694 0.668 0.703 0.703 0.712 0.697
T_Driven_pearson_LM_TRUE 0.694 0.718 0.688 0.706 0.709 0.697
T_Driven_pearson_RLM_FALSE 0.691 0.7 0.712 0.7 0.7 0.688
T_Driven_pearson_RLM_TRUE 0.706 0.712 0.718 0.703 0.7 0.688
T_Driven_spearman_LM_FALSE 0.703 0.703 0.703 0.718 0.715 0.706
T_Driven_spearman_LM_TRUE 0.7 0.712 0.694 0.703 0.729 0.706
T_Driven_spearman_RLM_FALSE 0.668 0.709 0.724 0.682 0.709 0.697
T_Driven_spearman_RLM_TRUE 0.691 0.676 0.7 0.697 0.724 0.697

miny = min(pbKNNaucM)-0.05
maxy = max(pbKNNaucM)+0.15

plot(thr,pbKNNaucM[1,],ylim=c(miny,maxy),
     main="KNN's ROCAUC",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="ROC AUC",
     type="l",
     col=1,
     lwd=2)
for (ind in 2:nrow(pbKNNaucM))
{
  lines(thr,pbKNNaucM[ind,],col=ind,lwd=2,lty=ind)
}

legend("topleft", rownames(pbKNNaucM),lty=1:length(thenames), col = 1:length(thenames),cex=0.55,ncol=2)

fastRows <- str_detect(rownames(pbKNNaucM),"fast")
pearsonRows <- str_detect(rownames(pbKNNaucM),"pearson")
spearmanRows <- str_detect(rownames(pbKNNaucM),"spearman")
T_BlindRows <- str_detect(rownames(pbKNNaucM),"T_Blind")
corRankRows <- str_detect(rownames(pbKNNaucM),"TRUE")
maxCorRankRows <- str_detect(rownames(pbKNNaucM),"FALSE")
RLMfitMethod <- str_detect(rownames(pbKNNaucM),"RLM")


meanAuc <-  colMeans(pbKNNaucM[fastRows,])
meanAuc <-  rbind(meanAuc,colMeans(pbKNNaucM[pearsonRows,]))
meanAuc <-  rbind(meanAuc,colMeans(pbKNNaucM[spearmanRows,]))
meanAuc <-  rbind(meanAuc,colMeans(pbKNNaucM[!T_BlindRows,]))
meanAuc <-  rbind(meanAuc,colMeans(pbKNNaucM[T_BlindRows,]))
meanAuc <-  rbind(meanAuc,colMeans(pbKNNaucM[corRankRows,]))
meanAuc <-  rbind(meanAuc,colMeans(pbKNNaucM[maxCorRankRows,]))
meanAuc <-  rbind(meanAuc,colMeans(pbKNNaucM[RLMfitMethod,]))
meanAuc <-  rbind(meanAuc,colMeans(pbKNNaucM[!RLMfitMethod,]))
legnames <- c("fast","Pearson","Spearman","T_Driven","T_Blind","SumCor","MaxCor","RLM","LM")


pbKNNaccM <- as.data.frame(pbKNNaccM)
pbKNNaccM[,1:ncol(pbKNNaccM)] <- sapply(pbKNNaccM,as.numeric)

Average_Latent_SizeM <- as.data.frame(Average_Latent_SizeM)
Average_Latent_SizeM[,1:ncol(Average_Latent_SizeM)] <- sapply(Average_Latent_SizeM,as.numeric)
Average_Latent_SizeM[is.na(Average_Latent_SizeM)] <- 0

SigDeM <- as.data.frame(SigDeM)
SigDeM[,1:ncol(SigDeM)] <- sapply(SigDeM,as.numeric)

sparcityM <- as.data.frame(sparcityM)
sparcityM[,1:ncol(sparcityM)] <- sapply(sparcityM,as.numeric)

miny = min(meanAuc)-0.01
maxy = max(meanAuc)+0.025

plot(thr,meanAuc[1,],ylim=c(miny,maxy),
     main="Mean KNN's ROCAUC",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="ROC AUC",
     type="l",
     col=1,
     lwd=2,
     lty=1)
for (ind in 2:nrow(meanAuc))
{
  lines(thr,meanAuc[ind,],col=ind,lwd=2,lty=ind)
}
legend("topleft", legnames,lty=1:length(legnames), col = 1:length(legnames),cex=0.75)



miny = min(pbKNNaccM) - 0.025
maxy = max(pbKNNaccM) + 0.1

plot(thr,pbKNNaccM[1,],ylim=c(miny,maxy),
     main="KNN's Accuracy",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="Accuracy",
     type="l",
     col=1,
     lwd=2)
for (ind in 2:nrow(pbKNNaucM))
{
  lines(thr,pbKNNaccM[ind,],col=ind,lwd=2,lty=ind)
}
legend("topleft", rownames(pbKNNaucM),lty=1:length(thenames), col = 1:length(thenames),cex=0.55,ncol=2)



meanAcc <-  colMeans(pbKNNaccM[fastRows,])
meanAcc <-  rbind(meanAcc,colMeans(pbKNNaccM[pearsonRows,]))
meanAcc <-  rbind(meanAcc,colMeans(pbKNNaccM[spearmanRows,]))
meanAcc <-  rbind(meanAcc,colMeans(pbKNNaccM[!T_BlindRows,]))
meanAcc <-  rbind(meanAcc,colMeans(pbKNNaccM[T_BlindRows,]))
meanAcc <-  rbind(meanAcc,colMeans(pbKNNaccM[corRankRows,]))
meanAcc <-  rbind(meanAcc,colMeans(pbKNNaccM[maxCorRankRows,]))
meanAcc <-  rbind(meanAcc,colMeans(pbKNNaccM[RLMfitMethod,]))
meanAcc <-  rbind(meanAcc,colMeans(pbKNNaccM[!RLMfitMethod,]))

miny = min(meanAcc)-0.01
maxy = max(meanAcc)+0.025

plot(thr,meanAcc[1,],ylim=c(miny,maxy),
     main="Mean KNN's Accuracy",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="Accuracy",
     type="l",
     col=1,
     lwd=2)
for (ind in 2:nrow(meanAcc))
{
  lines(thr,meanAcc[ind,],col=ind,lwd=2,lty=ind)
}
legend("topleft", legnames,lty=1:length(legnames), col = 1:length(legnames),cex=0.75)





miny = 1
maxy = max(Average_Latent_SizeM)

plot(thr,Average_Latent_SizeM[1,],ylim=c(miny,maxy),
     main="Average Size of Latent-Variable",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="Size",
     type="l",
     col=1,
     lwd=2,
     log = "y")

for (ind in 2:nrow(Average_Latent_SizeM))
{
  lines(thr,Average_Latent_SizeM[ind,],col=ind,lwd=2,lty=ind)
}
legend("topright", rownames(Average_Latent_SizeM),lty=1:length(thenames), col = 1:length(thenames),cex=0.55,ncol=2)




meanAccAvgSize <-  colMeans(Average_Latent_SizeM[fastRows,])
meanAccAvgSize <-  rbind(meanAccAvgSize,colMeans(Average_Latent_SizeM[pearsonRows,]))
meanAccAvgSize <-  rbind(meanAccAvgSize,colMeans(Average_Latent_SizeM[spearmanRows,]))
meanAccAvgSize <-  rbind(meanAccAvgSize,colMeans(Average_Latent_SizeM[!T_BlindRows,]))
meanAccAvgSize <-  rbind(meanAccAvgSize,colMeans(Average_Latent_SizeM[T_BlindRows,]))
meanAccAvgSize <-  rbind(meanAccAvgSize,colMeans(Average_Latent_SizeM[corRankRows,]))
meanAccAvgSize <-  rbind(meanAccAvgSize,colMeans(Average_Latent_SizeM[maxCorRankRows,]))
meanAccAvgSize <-  rbind(meanAccAvgSize,colMeans(Average_Latent_SizeM[RLMfitMethod,]))
meanAccAvgSize <-  rbind(meanAccAvgSize,colMeans(Average_Latent_SizeM[!RLMfitMethod,]))

miny =1
maxy = max(meanAccAvgSize) + 10

plot(thr,meanAccAvgSize[1,],ylim=c(miny,maxy),
     main="Mean Size of Average-Latent-Variable",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="Size",
     type="l",
     col=1,
     lwd=2,
     log = "y")
for (ind in 2:nrow(meanAccAvgSize))
{
  lines(thr,meanAccAvgSize[ind,],col=ind,lwd=2,lty=ind)
}
legend("topright", legnames,lty=1:length(legnames), col = 1:length(legnames),cex=0.75)




miny = min(La_SignificantM)
maxy = max(La_SignificantM)

plot(thr,La_SignificantM[1,],ylim=c(miny,maxy),
     main="Number of Discovered Features",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="Number of Features",
     type="l",
     col=1,
     lwd=2,
     log = "y")

for (ind in 2:nrow(La_SignificantM))
{
  lines(thr,La_SignificantM[ind,],col=ind,lwd=2,lty=ind)
}
legend("bottomright", rownames(La_SignificantM),lty=1:length(thenames), col = 1:length(thenames),cex=0.55,ncol=2)




meanDiscovered <-  colMeans(La_SignificantM[fastRows,])
meanDiscovered <-  rbind(meanDiscovered,colMeans(La_SignificantM[pearsonRows,]))
meanDiscovered <-  rbind(meanDiscovered,colMeans(La_SignificantM[spearmanRows,]))
meanDiscovered <-  rbind(meanDiscovered,colMeans(La_SignificantM[!T_BlindRows,]))
meanDiscovered <-  rbind(meanDiscovered,colMeans(La_SignificantM[T_BlindRows,]))
meanDiscovered <-  rbind(meanDiscovered,colMeans(La_SignificantM[corRankRows,]))
meanDiscovered <-  rbind(meanDiscovered,colMeans(La_SignificantM[maxCorRankRows,]))
meanDiscovered <-  rbind(meanDiscovered,colMeans(La_SignificantM[RLMfitMethod,]))
meanDiscovered <-  rbind(meanDiscovered,colMeans(La_SignificantM[!RLMfitMethod,]))

miny = min(meanDiscovered)
maxy = max(meanDiscovered) + 10

plot(thr,meanDiscovered[1,],ylim=c(miny,maxy),
     main="Average Number of Discovered Features",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="Number of Features",
     type="l",
     col=1,
     lwd=2,
     log = "y")
for (ind in 2:nrow(meanDiscovered))
{
  lines(thr,meanDiscovered[ind,],col=ind,lwd=2,lty=ind)
}
legend("bottomright", legnames,lty=1:length(legnames), col = 1:length(legnames),cex=0.75)



SigDeM[is.na(SigDeM)] <- 0
miny = 1
maxy = max(SigDeM) + 200

plot(thr,SigDeM[1,],ylim=c(miny,maxy),
     main="Number of Significant Latent Variables",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="How Many",
     type="l",
     col=1,
     lwd=2,
     log = "y")

for (ind in 2:nrow(SigDeM))
{
  lines(thr,SigDeM[ind,],col=ind,lwd=2,lty=ind)
}
legend("topright", rownames(SigDeM),lty=1:length(thenames), col = 1:length(thenames),cex=0.55,ncol=2)



SigLatent <-  colMeans(SigDeM[fastRows,])
SigLatent <-  rbind(SigLatent,colMeans(SigDeM[pearsonRows,]))
SigLatent <-  rbind(SigLatent,colMeans(SigDeM[spearmanRows,]))
SigLatent <-  rbind(SigLatent,colMeans(SigDeM[!T_BlindRows,]))
SigLatent <-  rbind(SigLatent,colMeans(SigDeM[T_BlindRows,]))
SigLatent <-  rbind(SigLatent,colMeans(SigDeM[corRankRows,]))
SigLatent <-  rbind(SigLatent,colMeans(SigDeM[maxCorRankRows,]))
SigLatent <-  rbind(SigLatent,colMeans(SigDeM[RLMfitMethod,]))
SigLatent <-  rbind(SigLatent,colMeans(SigDeM[!RLMfitMethod,]))

miny = 1
maxy = max(SigLatent) + 10


plot(thr,SigLatent[1,],ylim=c(miny,maxy),
     main="Average # of Significant Latent Variables",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="How Many",
     type="l",
     col=1,
     lwd=2,
     log = "y")
for (ind in 2:nrow(SigLatent))
{
  lines(thr,SigLatent[ind,],col=ind,lwd=2,lty=ind)
}
legend("topright", legnames,lty=1:length(legnames), col = 1:length(legnames),cex=0.75)




sparcityM[is.na(sparcityM)] <- 0
miny = min(sparcityM)
maxy = max(sparcityM) + 0.25 

plot(thr,sparcityM[1,],ylim=c(miny,maxy),
     main="Matrix Sparcity",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="Sparcity",
     type="l",
     col=1,
     lwd=2,
     log = "y")

for (ind in 2:nrow(sparcityM))
{
  lines(thr,sparcityM[ind,],col=ind,lwd=2,lty=ind)
}
legend("topright", rownames(sparcityM),lty=1:length(thenames), col = 1:length(thenames),cex=0.55,ncol=2)




meanSparcity <-  colMeans(sparcityM[fastRows,])
meanSparcity <-  rbind(meanSparcity,colMeans(sparcityM[pearsonRows,]))
meanSparcity <-  rbind(meanSparcity,colMeans(sparcityM[spearmanRows,]))
meanSparcity <-  rbind(meanSparcity,colMeans(sparcityM[!T_BlindRows,]))
meanSparcity <-  rbind(meanSparcity,colMeans(sparcityM[T_BlindRows,]))
meanSparcity <-  rbind(meanSparcity,colMeans(sparcityM[corRankRows,]))
meanSparcity <-  rbind(meanSparcity,colMeans(sparcityM[maxCorRankRows,]))
meanSparcity <-  rbind(meanSparcity,colMeans(sparcityM[RLMfitMethod,]))
meanSparcity <-  rbind(meanSparcity,colMeans(sparcityM[!RLMfitMethod,]))

miny = min(meanSparcity)
maxy = max(meanSparcity)+0.25


plot(thr,meanSparcity[1,],ylim=c(miny,maxy),
     main="Mean Matrix Sparcity",
     xlab="Correlation-Matrix's Maximum Goal",
     ylab="Sparcity",
     type="l",
     col=1,
     lwd=2,
     log = "y")
for (ind in 2:nrow(meanSparcity))
{
  lines(thr,meanSparcity[ind,],col=ind,lwd=2,lty=ind)
}
legend("topright", legnames,lty=1:length(legnames), col = 1:length(legnames),cex=0.75)

2.2.2 Saving All


save.image("~/GitHub/LatentBiomarkers/RMD/TADPOLE_ALL_Options.RData")